Statistics for Optimization of Regular Path Queries in Graph Databases