add count function to controller and routes