I suggest you use a "while" loop and input your html file to it.
The loop will read line after line and output each line to an output_file. When /* is detected, then trigger a boolean variable to true (meaning you are in a comment section), you can start incrementing the number of lines counter. Keep looping until you detect a */. Then turn the boolean varaible back to false (no more in a comment area) stop increment the number of lines counter a re-start outputing the line to the output file.
You can write a script like this one, where:
input_file is your HTML file
output file will be you HTML without the stuff between /* and */
line_is_comment the boolean variable
nb_of_comment_line, I think you can figure
It will print at the end the number of comment line.
Don't forget to "chmod a+x" your script to make it executable.
If you launch it several time, you will have to remote "output_file" between each execution (otherwirse, lines will keep on adding up at the end of the file)
declare -i nb_of_comment_line=0
while read PARAM_NAME PARAM_VALUE
if [ "$PARAM_NAME" = "/*" ]
if [ "$line_is_comment" = "false" ]
echo "$PARAM_NAME $PARAM_VALUE">>output_file
if [ "$PARAM_NAME" = "*/" ]
echo Nomber of comment lines is: $nb_of_comment_line
Note that this is bash script.
Hope this help. Can provide more detail if needed