In MySQL, boolean expressions can be used as integers -- with 0 for false and 1 for true. So, the following works:
SELECT p.*,
((name LIKE '%samsung%') + (name LIKE '%galaxy%') + (name LIKE '%s4%')) as hits
FROM myprods p
WHERE name LIKE '%samsung%' OR name LIKE '%galaxy%' OR name LIKE '%s4%';
EDIT:
If MySQL, you can also express this query as:
SELECT p.*,
((name LIKE '%samsung%') + (name LIKE '%galaxy%') + (name LIKE '%s4%')) as hits
FROM myprods p
HAVING hits > 0;
The use of having
in this context is a SQL extension and doesn't work in other databases. But, it does allow a query to refer to a column alias for filtering, without using a subquery.