Trying to send and receive at both the end of Arduino boards on SPI

That second block of code looks very strange. When properly formatted, loop looks like:

void loop()
{
   count = 2;
   if(count ==1)
   {
     mode2(); 
     count--; 
   }
   
   delay(1000);

   if(count == 2)
   {
      mode1();
      count = 2;  
   }
}

count is set to 1 every pass through loop. It is not volatile, so nothing is going to change it between when it is set and when it is tested. So, mode2() will never be called. If count is 2, and it can never be anything but 2, mode1() is called, and count is reset to 2. Which is what it was. What is the purpose of all this folderol? Get rid of the useless code, and just call delay() (ugh!) and mode1().