count function implemented
Count functions implemented