Count functionality done