Fetch Parent and it's Child records

Fetch Parent and it's Child records

Hi

Need some urgent help. 

I have a lookup relationship from cases(child) to potential(parent) 

Once I associated a potential to a case, I need a script to trigger which will fetch all the related child cases for that particular potential and count them. 

Any help is appreciated.