Get number of sources for each identity

Hello @brennenscott this worked perfectly fine.
Thnak you!