grep is not sufficient for this task. Here is a perl script that does the job.
#!/usr/bin/perl
# count_xml_tags.pl
my $xml_tag = shift;
my $filename = shift;
my $count = 0;
open (X_FILE, '<', $filename) or die "Failed to read file $filename : $!";
{
local $/;
while (<X_FILE>) {
}
close (X_FILE);
print "$count $xml_tag tag(s) found.\n";
Run this script as:
% perl count_xml_tags.pl some_tag filename.xml