title: Rails count number of checkboxes in a view before posting
body: <p>I have little knowledge of Javascript, but I think it might be the only way to make things work in my problem.
  I am using rails 5.
  I basically have checkboxes in a view that represent a price, and every time I check or uncheck one, I would like to update the total price for that view (that I then pass in a hidden_field and a post request).
  I'm guessing that what I have to do is get an onclick event going everytime I check or uncheck a box, and update a variable that I then show in the view.</p>
  
  <p>I've found something that looks very similar to my case, but unfortunately I'm unable to reproduce it: <a href="https://stackoverflow.com/questions/36704155/rails-jquery-compute-total-from-selected-checkboxes-in-a-table">Rails Jquery compute total from selected checkboxes in a table</a></p>
  
  <p>I have my checkboxes with a class "checkbox-count", and I can send an alert everytime I check them, but that's about all I have so far...</p>
  
  <p>Your help would be very appreciated!</p>