fixed a crash caused by deleted function

don't count a function that is "deleted"