title: numberofRowsInSection with 2 counts
body: <p>I have got a json result, that looks like this:</p>
  
  <pre><code>[{
      "EventDate": "2015-02-19",
      "PubEvents": [{
          "Title": "Ladies Night",
          "Description": "Every thursday is Ladies Night at the Irish House.\nLadies: 2 cocktails for the price of 1 - 1 pint of Crowmoor Cider - 30 kr",
          "EventType": "LadiesNight",
          "Start": "2015-02-19",
          "End": "2015-02-20",
          "StartTime": "19:00",
          "EndTime": "02:00",
          "Image": "ladies.jpg"
      }, {
          "Title": "Pat Kelly",
          "Description": "Pat Kelly from Ireland has extensive experience in entertaining all nationalities, as he has travelled around the world from New York to Amsterdam. He has a very wide repertoire maintaining a traditional approach, and is well received and appreciated for his ability to get his audience excited every night he hits the stage. A “sure thing” evening you will get with the talented Pat.",
          "EventType": "Music",
          "Start": "2015-02-19",
          "End": "2015-02-20",
          "StartTime": "21:30",
          "EndTime": "01:00",
          "Image": "http://irishhouse.appninja.dk/Images/Musicians/kelly"
      }],
      "Matches": [{
          "EventType": "Sports",
          "Start": "2015-02-19",
          "End": "2015-02-19",
          "StartTime": "18:00",
          "EndTime": "19:00",
          "HomeTeam": {
              "Id": 0,
              "TeamName": "Hold",
              "HomeImageUrl": "defaultHome.png",
              "AwayImageUrl": "defaultAway.png",
              "Badge": "defaultBadge.png"
          },
          "AwayTeam": {
              "Id": 0,
              "TeamName": "AndetHold",
              "HomeImageUrl": "defaultHome.png",
              "AwayImageUrl": "defaultAway.png",
              "Badge": "couldn't get an away team"
          }
      }]
  }, {
      "EventDate": "2015-02-20",
      "PubEvents": [{
          "Title": "Pat Kelly",
          "Description": "Pat Kelly from Ireland has extensive experience in entertaining all nationalities, as he has travelled around the world from New York to Amsterdam. He has a very wide repertoire maintaining a traditional approach, and is well received and appreciated for his ability to get his audience excited every night he hits the stage. A “sure thing” evening you will get with the talented Pat.",
          "EventType": "Music",
          "Start": "2015-02-20",
          "End": "2015-02-21",
          "StartTime": "22:30",
          "EndTime": "02:00",
          "Image": "http://irishhouse.appninja.dk/Images/Musicians/kelly"
      }],
      "Matches": []
  },
  </code></pre>
  
  <p>An Array of Events in the format:</p>
  
  <pre><code>var eventDate : String?
  var pubEvents : Array&lt;PubEvent&gt;?
  var matches : Array&lt;Match&gt;?
  </code></pre>
  
  <p>numberOfSectionsInTableView is eventarray.count, as every date is distinct</p>
  
  <p>I am struggling with numberOfRowsInSection. It should be either </p>
  
  <pre><code>self.eventarray[section].pubEvents?.count or self.eventarray[section].matches?.count
  </code></pre>
  
  <p>depending on which has the highest count.</p>
  
  <p>This is my first attempt of doing Swift, and I'd appreciate a point in the right direction. I tried this:</p>
  
  <pre><code>func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          var returncount : Int = 1
          if let pubeventscount = self.eventarray[section].pubEvents?.count{
              if let sportscount = self.eventarray[section].matches?.count{
                  if pubeventscount &gt; sportscount{
                      returncount = pubeventscount
                  }
                  else{
                      returncount = sportscount
                  }
              }
          }
          return returncount
  
      }
  </code></pre>
  
  <p>But no result</p>