data0_bit_end <= '1' when (count >= data0_end_count) else '0';
vhdl will also force you to have the correct types. The systhesis tools should correctly report size errors, but I wouldn't rely on it.
this means you might need to import ieee.numeric_std.all, and then cast count/data0_end_count to unsigned -- unsigned (count) >= unsigned(data0_end_count).