One way would be to double your columns with attributes and put a =IF(B2=y,1,) in each one where B2 corresponds to the "free" column then just add sum each of the new cells.
Can you post a bigger bit of the sheet (width wise)
Ok, just read it properly and thats not what your after
hang on