I think current_user is not the right user here to filter by. This is on the users/show page, so I assume the number of reported work packages should refer to the user whose profile is shown, not the user viewing the profile.