Create a count function in the user repository