Do not include . and .. directories while counting children.

Change database query to count the number of children content has to exclude . and .. directories.