count function written