made count function