public int getOutcomeComparedValues(IntervalDescription intDesc, String feature, String countOption, double value1, double value2)
    {
    	int result = 0;
    	   	
    	for(int i=0; i < intervalsList.size(); i++)
    	{
    		LinkedList<interval> currentList = intervalsList.get(i);
    		if(!currentList.isEmpty())
    		{
    			interval firstInt = currentList.getFirst();
    			if(firstInt.intervalDescription == intDesc)
    			{ 				
    				for(interval interval: currentList)
    				{
    					for(IntervalResult intResult: interval.Results)
    					{
					    	if(feature.equalsIgnoreCase(">"))
							{
								if(intResult.result > value1)
								{
									/*
									 * If we are counting instants, just add 1.
									 * If we are counting intervals, add 1 when encountered and then break
									 * the results list (so that we don't add more)
									 */
									if(countOption.equalsIgnoreCase("instant"))
									{
										result++;
									}
									else
									{
										result ++;
										break;
									}
								}
							}
							else if(feature.equalsIgnoreCase(">="))
							{
								if(intResult.result >= value1)
								{
									if(countOption.equalsIgnoreCase("instant"))
									{
										result++;
									}
									else
									{
										result ++;
										break;
									}
								}
							}
							else if(feature.equalsIgnoreCase("<"))
							{
								if(intResult.result < value1)
								{
									if(countOption.equalsIgnoreCase("instant"))
									{
										result++;
									}
									else
									{
										result ++;
										break;
									}
								}
							}
							else if(feature.equalsIgnoreCase("<="))
							{
								if(intResult.result <= value1)
								{
									if(countOption.equalsIgnoreCase("instant"))
									{
										result++;
									}
									else
									{
										result ++;
										break;
									}
								}
							}
							else if(feature.equalsIgnoreCase("="))
							{
								if(intResult.result == value1)
								{
									if(countOption.equalsIgnoreCase("instant"))
									{
										result++;
									}
									else
									{
										result ++;
										break;
									}
								}
							}
							else if(feature.equalsIgnoreCase("a <= X <= b"))
							{
								if(value1 <= intResult.result && intResult.result <= value2)
								{
									if(countOption.equalsIgnoreCase("instant"))
									{
										result++;
									}
									else
									{
										result ++;
										break;
									}
								}
							}
							else if(feature.equalsIgnoreCase("a < X <= b"))
							{
								if(value1 < intResult.result && intResult.result <= value2)
								{
									if(countOption.equalsIgnoreCase("instant"))
									{
										result++;
									}
									else
									{
										result ++;
										break;
									}
								}
							}
							else if(feature.equalsIgnoreCase("a <= X < b"))
							{
								if(value1 <= intResult.result && intResult.result < value2)
								{
									if(countOption.equalsIgnoreCase("instant"))
									{
										result++;
									}
									else
									{
										result ++;
										break;
									}
								}
							}
							else if(feature.equalsIgnoreCase("a < X < b"))
							{
								if(value1 < intResult.result && intResult.result < value2)
								{
									if(countOption.equalsIgnoreCase("instant"))
									{
										result++;
									}
									else
									{
										result ++;
										break;
									}
								}
							}
							else if(feature.equalsIgnoreCase("a <= X or X >= b"))
							{
								if(value1 <= intResult.result || intResult.result >= value2)
								{
									if(countOption.equalsIgnoreCase("instant"))
									{
										result++;
									}
									else
									{
										result ++;
										break;
									}
								}
							}
							else if(feature.equalsIgnoreCase("a < X or X >= b"))
							{
								if(value1 < intResult.result || intResult.result >= value2)
								{
									if(countOption.equalsIgnoreCase("instant"))
									{
										result++;
									}
									else
									{
										result ++;
										break;
									}
								}
							}
							else if(feature.equalsIgnoreCase("a <= X or X > b"))
							{
								if(value1 <= intResult.result || intResult.result > value2)
								{
									if(countOption.equalsIgnoreCase("instant"))
									{
										result++;
									}
									else
									{
										result ++;
										break;
									}
								}
							}
							else if(feature.equalsIgnoreCase("a < X or X > b"))
							{
								if(value1 < intResult.result || intResult.result > value2)
								{
									if(countOption.equalsIgnoreCase("instant"))
									{
										result++;
									}
									else
									{
										result ++;
										break;
									}
								}
							}
    					}
    				}
    				
    				break;
    			}
    		}
    	}
    	
    	return result;
    }