Ok to rephrase it he can only kill people who die by his hand or because of the effect of something he did. Although it would be more clear if someone else killed people in the arc where pain attacked Konoha.
I guess there are a few loopholes in his technique.
He ressurect the people that he kills.
He didn't exactly kill Yahiko I think. It was more of an accident that Yahiko ran into his Kunai...
Well, not an accident but you get my point.
yeah.. he can only ressurect those who killed by Pain!!