Well, I must say, your references to your table structure are so vague, I can only guess.
So...my suggestion is to JOIN your r1 table and GROUP BY p1.t1_id. In your SELECT fields portion of your query, include COUNT(r1.t1_id).
This is totally off the top of my head. For example, I'm not even sure that you even need to specify the table alias of p1 in the GROUP BY clause, nor if the table alias for r1 is requisite in the COUNT() function parameter. Hopefully, this will give you a boost in the right direction at least.