[build] count graph rules