You mentioned the data was parallel earlier, but here you're only allowing for one data line, so I'll presume you meant the data was purely serial.
Every time loop() is run, the variable data is recreated losing the previous information. So while I can see your intention is to read the data line for 4 pulses then output, the only thing you'll ever have to output is the value of the most recent digitalRead (either 0 or 1 being LOW or HIGH) stored in the variable data. So if you're going to construct the data variable a bit at a time, that variable needs to have a global scope, same as your count variable, and store the bit that you read in the right position within it (via bitset() maybe, or some bitwise math regardless) each iteration of loop() then discard the content on the 4th pass after printing. Hope that makes sense.
Also while your comment suggests this next test is for a rising edge...
if (clock == HIGH) // At each raising edge data should be taken
in actual case there's nothing to stop it reading the data line multiple times for any one HIGH pulse of the clock, presuming loop() executes fast enough. Also, of course there's nothing there to stop it missing out on data if your loop() takes too long, but that's unlikely in this scenario I think. If you truly need it to be on the rising edge, you might consider implementing this using interrupts; alternatively use an additional check that the clock line is HIGH, but last time through was LOW, and only act when that's the case.
Cheers ! Geoff