$(document).ready(function() {
    $('#analysis_basic').click(function() {

        var diaryWrittenElement = $(".day.diary-written").not(".new");
        var countDiaryWrittenElement = diaryWrittenElement.length; 
        var message = "한 달중 쓴 총 일기 : "+countDiaryWrittenElement;
        alert(message);
    });
});

@@ -138,16 +138,28 @@
 (%22.new%22)
+.not(%22.old%22)
 ;%0A      

fix analysis_basic.js: add not selector for excluding ".old"