Added method to get visited count per element