HTML/ embedded Ruby word count code input

this is a comment page of a school curriculum grading system. I want to do this:
1. Count the number of words in each comment
2. When the whole loop is over, count out the total number of words of all comments

< div id= "header" >
< H1 > Course Rating Information < / H1 >


Number:
<% = @ course.number% >



Year:
<% = @ course.year% >



Name:
<% = @ course.name% >

<strong>Commenter:</strong> <%= comment.commenter %>

<strong>Comment:</strong> <%= comment.comment %>

< end >
< else >
< H2 > No ratings available < / H2 >
< end >
< / div >
< div id= "footer" >
<% = link_to "New Comment", new_course_comment_path (@ course) >

<% = link_to "Back to course listing", courses_path% >
< / div >


@ course.comments.sum {| cc | cc.comment.length}

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b377c2-2c07c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b377c2-2c07c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?