The following is a simple XQuery that would run an xpath against an htm file and return how many matching tags were found. The xpath rules are in variable $rule, but I would