validation rules

Hi to all.

Could you please help on how to set a validation rules comparing a count of records?

for example, I want to set a validation rule: number of districts with population at risk EQUAL TO number of districts with targeted population; assuming that, populatin at risk and targeted population are two data elements.

Thank you

Henri Moungui

Yaounde - Cameroon