grep(1) -oE %22ERROR%7CWARN%22 *log* %7C sort %7C uniq -c
print lines matching a pattern
-o, --only-matching
       Print  only  the  matched  (non-empty) parts of a matching line, with each such part on a separate
       output line.
Matcher Selection
    -E, --extended-regexp
           Interpret PATTERN as an extended regular expression (ERE, see below).  (-E is specified by POSIX.)
grep searches the named input FILEs (or standard input if no files are named, or if a single hyphen-minus
(-) is given as file name) for lines containing a match to the given PATTERN.  By  default,  grep  prints
the matching lines.
General Output Control
    -c, --count
           Suppress normal output; instead print a count of matching lines for each input file.  With the -v,
           --invert-match option (see below), count non-matching lines.  (-c is specified by POSIX.)
source manpages: grep