move pr count method to pr class