From your description it looks like you want to know if you have any pallets at all on the conveyor... is that right?
The hardware you already have in place will allow you to not only know if you have any pallets but also how many and where they are located.
You said you had 4 sensors, right?
So that makes for 3 sections between sensors; Sec-A, Sec-B & Sec-C
Depending on the PLC, I would use either three Up/Down Counters or three Add/Sub pairs. In some PLC's an Up/Down Counter comes at somewhat of a premium. If this is the case then save the counters and use the Add/Sub pairs.
Note: In the following...
Inc = Increment Up/Down Counter total
Dec = Decrement Up/Down Counter total
Add = Add 1 to specified section total
Sub = Subtract 1 from specified section total
As a pallet comes in Inc or Add the Sec-A total.
When a pallet trips the second sensor, Dec or Sub Sec-A total, and Inc or Add the Sec-B total.
When a pallet trips the third sensor, Dec or Sub the Sec-B total, and Inc or Add the Sec-C total.
When a pallet trips the fourth sensor, Dec or Sub the Sec-C total.
At this point the program knows how many pallets there are and where they are located.
The question for you now is... what is it that you really want to know when an E-Stop occurs?
Do you simply want to know if there are any pallets at all?
Do you want to know how many pallets?
Do you want to know where the pallets are located?
Any at all...
If using the Up/Down Counters then simply look for Not-zero in each counter.
If using the Add/Sub pairs, then add the three section totals together and look for Not-zero.
In either case, if a Not-zero is produced then you have at least one pallet, somewhere on the conveyor.
How many...
If using the Up/Down Counters then add the three Up/Down counts.
If using the Add/Sub pairs, then add the three section totals.
Where...
If using the Up/Down Counters then U/D Counter-A shows the current count in Section-A. Likewise for Counter-B/Section-B and Counter-C/Section-C.
If using the Add/Sub pairs then the value in variable Section-A is the current count in Section-A. Likewise for Section-B and Section-C.
Things to be aware of...
Whether you use counters or Add/Sub, it's possible that the total in any section might go negative unless something prevents it from doing so.
It's possible that a pallet might enter a section just as one is leaving. Be sure that the Add or Inc is done before the Sub or Dec.
During an E-Stop there is no telling what the operators are doing in terms of the pallets. They might remove pallets or relocate them from one section to another.